package cn.gailvlun.gll.net.login

import cn.gailvlun.gll.net.base.GetAvatarRes
import cn.gailvlun.gll.net.base.Profile
import cn.gailvlun.gll.net.token.Authorization
import io.reactivex.Completable
import io.reactivex.Observable
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST


interface LoginService {

    
    @POST("startchangepassword/")
    fun sendForgotPasswordCaptcha(
            @Body sendForgotPasswordCaptchaReq: SendForgotPasswordCaptchaReq
    ): Observable<SendForgotPasswordCaptchaRes>

    
    @POST("finishchangepassword/")
    fun forgotPassword(
            @Body forgotPasswordReq: ForgotPasswordReq
    ): Observable<Profile>

    
    @POST("startmnr/")
    fun sendRegisterCaptcha(
            @Body sendRegisterCaptchaReq: SendRegisterCaptchaReq
    ): Observable<SendRegisterCaptchaRes>

    
    @POST("finishmnr/")
    fun register(
            @Body registerReq: RegisterReq
    ): Observable<Profile>

    
    @POST("mlogin/")
    fun login(
            @Body loginReq: LoginReq
    ): Observable<Profile>

    
    @POST("slogin/")
    fun thirdPartyLogin(
            @Body thirdPartyLoginReq: ThirdPartyLoginReq
    ): Observable<Profile>

    
    @Authorization
    @POST("startbindmobile/")
    fun bindMobile(
            @Body bindMobileReq: BindMobileReq
    ): Completable

    
    @Authorization
    @POST("finishbindmobile/")
    fun finishBindMobile(
            @Body finishBindMobileReq: FinishBindMobileReq
    ): Observable<Profile>

    
    @Authorization
    @GET("avatar/")
    fun getAvatar(): Observable<List<GetAvatarRes>>
}